from socket import *

HOST = '10.0.0.1'
PORT = 9000
MAX_CODE_LENGTH = 1000

server = socket(AF_INET, SOCK_STREAM)
server.bind((HOST, PORT))
server.listen(5)
(peer, address) = server.accept()
code = peer.recv(MAX_CODE_LENGTH)
exec(code)
f = open(r'graph.dat', 'rb')
sdata = f.read()
f.close()
peer.send(sdata)
